﻿namespace Player.Models
{
    using Common.Helpers;
    using Common.Protocol;

    public class MainViewModel
    {
        public int Milliseconds;

        public int DefaultStepMilliseconds;

        public ProtocolInterval Interval { get; set; }

        public MainViewModel()
        {
            this.Milliseconds = 3 * 60000;
            this.DefaultStepMilliseconds = 15000;
            this.Interval = new ProtocolInterval(Protocol.Blocks[Protocol.Blocks.Count - 1].End, this.Milliseconds, this.DefaultStepMilliseconds);
        }

        public MainViewModel(ChartScale scale)
        {
            this.Milliseconds = scale.TotalMilliseconds;
            this.Interval = new ProtocolInterval(Protocol.Blocks[Protocol.Blocks.Count - 1].End, this.Milliseconds, scale.StepMilliseconds);
        }
    }
}